import MarkdownToWord from "./wordPlugin.js";
import path from "path";
import { fileURLToPath } from "url";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const testMdPath = path.join(__dirname, "test.md");
const testOutputPath = path.join(__dirname, "output.docx");

const converter = new MarkdownToWord();
converter
  .convert(testMdPath, testOutputPath)
  .then((success) => {
    if (success) {
      console.log("转换完成！");
    }
  })
  .catch((error) => console.error("转换失败:", error));
